﻿<%@ MasterType VirtualPath="~/SiteNavigation.master" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/SiteNavigation.master" AutoEventWireup="true" CodeFile="AllCourseInfo.aspx.cs" Inherits="Course_AllCourseInfo" MaintainScrollPositionOnPostback="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
    <div style="width: 656px">
        Search Courses:<br />
        <asp:Label ID="Label1" runat="server" Text="Course ID: "></asp:Label>
        <asp:TextBox ID="CourseCourseIdTxtBx" runat="server" Width="136px"></asp:TextBox>
&nbsp;&nbsp;
        <asp:Label ID="Label2" runat="server" Text="Name: "></asp:Label>
        <asp:TextBox ID="CourseNameTxtBx" runat="server" Width="198px"></asp:TextBox>
        <br />
        <br />
        <asp:Button ID="CourseSearchButton" runat="server" 
            onclick="CourseSearchButton_Click" style="margin-left: 99px" Text="Search" 
            Width="88px" />
        <br />
        <hr />
    </div>
    <div>
        <asp:GridView ID="CourseInfoGridView" runat="server" 
            AutoGenerateColumns="False" DataKeyNames="AutoId" EnableModelValidation="True" 
            onrowcancelingedit="GridViewCourseInfo_RowCancelingEdit" 
            onrowcommand="GridViewCourseInfo_RowCommand" 
            onrowdeleting="GridViewCourseInfo_RowDeleting" 
            onrowediting="GridViewCourseInfo_RowEditing" 
            onrowupdating="GridViewCourseInfo_RowUpdating" Width="661px">
            <Columns>
                <asp:TemplateField HeaderText="Course Id" SortExpression="CourseId">
                    <EditItemTemplate>
                        <asp:Label ID="CourseCourseIdGELabel" runat="server" 
                            Text='<%# Eval("CourseId") %>'></asp:Label>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="CourseCourseIdGFTxtBx" runat="server"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="CourseCourseIdGVLabel" runat="server" 
                            Text='<%# Bind("CourseId") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Name" SortExpression="Name">
                    <EditItemTemplate>
                        <asp:TextBox ID="CourseNameGETxtBx" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="CourseNameGFTxtBx" runat="server"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="CourseNameGVLabel" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Description" SortExpression="Description">
                    <EditItemTemplate>
                        <asp:TextBox ID="CourseDescriptionGETxtBx" runat="server" 
                            Text='<%# Bind("Description") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="CourseDescriptionGFTxtBx" runat="server"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="CourseDescriptionGVLabel" runat="server" 
                            Text='<%# Bind("Description") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Credit" SortExpression="Credit">
                    <EditItemTemplate>
                        <asp:TextBox ID="CourseCreditGETxtBx" runat="server" 
                            Text='<%# Bind("Credit") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="CourseCreditGFTxtBx" runat="server" Width="74px"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="CourseCreditGVLabel" runat="server" Text='<%# Bind("Credit") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Prerequisite" SortExpression="Prerequisite">
                    <EditItemTemplate>
                        <asp:TextBox ID="CoursePreGETxtBx" runat="server" 
                            Text='<%# Bind("Prerequisite") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="CoursePreGFTxtBx" runat="server"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="CoursePreGVLabel" runat="server" 
                            Text='<%# Bind("Prerequisite") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Corequisite" SortExpression="Corequisite">
                    <EditItemTemplate>
                        <asp:TextBox ID="CourseCoreGETxtBx" runat="server" 
                            Text='<%# Bind("Corequisite") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="CourseCoreGFTxtBx" runat="server"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="CourseCoreGVLabel" runat="server" 
                            Text='<%# Bind("Corequisite") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>

